package ApacheCommonLang;

import example.avro.User;
import org.apache.commons.lang3.*;
import org.apache.commons.lang3.builder.HashCodeBuilder;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;

/**
 * Created with IntelliJ IDEA.
 * User: belict
 * Date: 12/1/13
 * Time: 6:07 PM
 * To change this template use File | Settings | File Templates.
 */
public class Run {
    public static void main(String[] args) throws FileNotFoundException, ClassNotFoundException {
        User user1 = new User("Alex",27,"bluue");
        //SerializationUtils.serialize(user,new FileOutputStream("tmp.bin"));
        User user2 = (User) SerializationUtils.deserialize(new FileInputStream("tmp.bin"));
        int res = ObjectUtils.compare(user1, user2);
        System.out.println(HashCodeBuilder.reflectionHashCode(user1,false));
    }
}
